package com.itcast.bos.service.impl;

import java.util.List;

import org.hibernate.engine.internal.ForeignKeys;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.itcast.bos.dao.AreaRepository;
import com.itcast.bos.domain.Area;
import com.itcast.bos.service.AreaService;
@Service
public class AreaServiceImpl implements AreaService {
	@Autowired
	private AreaRepository arearepository;
	@Override
	@Transactional
	public void batchImport(List<Area> areas) {

			arearepository.save(areas);
	}
	@Override
	public Page<Area> findPageData(Specification<Area> specification,
			Pageable pageable) {
		// TODO Auto-generated method stub
		return arearepository.findAll(specification, pageable);
	}

}
